package com.suray.attendance.model.bean;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.Date;
import java.util.Objects;

/**
 * Description: 钉钉考勤数据对象类
 * Author: linyu
 * Date: 2023/11/23
 */
@Data
@ApiModel(value = "AttendanceDataInfo")
@TableName("attendance_data_info")
public class AttendanceDataInfo {
    private Date workDate;
    private Long workTime;
    private String outcome;
    private String userId;
    private String startWorkTime;
    private String endWorkTime;
    private String startWorkResult;
    private String endWorkResult;


    public AttendanceDataInfo(Date workDate, Long workTime, String userId) {
        this.workDate = workDate;
        this.workTime = workTime;
        this.userId = userId;
    }

    public AttendanceDataInfo(Date workDate, String outcome, String userId) {
        this.workDate = workDate;
        this.outcome = outcome;
        this.userId = userId;
    }

    public AttendanceDataInfo(Date workDate, Long workTime, String outcome, String userId, String startWorkTime, String endWorkTime, String startWorkResult, String endWorkResult) {
        this.workDate = workDate;
        this.workTime = workTime;
        this.outcome = outcome;
        this.userId = userId;
        this.startWorkTime = startWorkTime;
        this.endWorkTime = endWorkTime;
        this.startWorkResult = startWorkResult;
        this.endWorkResult = endWorkResult;
    }

    public AttendanceDataInfo() {
    }

    public String getStartWorkTime() {
        return startWorkTime;
    }

    public void setStartWorkTime(String startWorkTime) {
        this.startWorkTime = startWorkTime;
    }

    public String getEndWorkTime() {
        return endWorkTime;
    }

    public void setEndWorkTime(String endWorkTime) {
        this.endWorkTime = endWorkTime;
    }

    public Date getWorkDate() {
        return workDate;
    }

    public void setWorkDate(Date workDate) {
        this.workDate = workDate;
    }

    public Long getWorkTime() {
        return workTime;
    }

    public void setWorkTime(Long workTime) {
        this.workTime = workTime;
    }

    public String getOutcome() {
        return outcome;
    }

    public void setOutcome(String outcome) {
        this.outcome = outcome;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }



    public String getStartWorkResult() {
        return startWorkResult;
    }

    public void setStartWorkResult(String startWorkResult) {
        this.startWorkResult = startWorkResult;
    }

    public String getEndWorkResult() {
        return endWorkResult;
    }

    public void setEndWorkResult(String endWorkResult) {
        this.endWorkResult = endWorkResult;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AttendanceDataInfo that = (AttendanceDataInfo) o;
        return Objects.equals(workDate, that.workDate) &&
                Objects.equals(workTime, that.workTime) &&
                Objects.equals(outcome, that.outcome) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(startWorkTime, that.startWorkTime) &&
                Objects.equals(endWorkTime, that.endWorkTime) &&
                Objects.equals(startWorkResult, that.startWorkResult) &&
                Objects.equals(endWorkResult, that.endWorkResult);
    }

    @Override
    public int hashCode() {
        return Objects.hash(workDate, workTime, outcome, userId, startWorkTime, endWorkTime, startWorkResult, endWorkResult);
    }
}
